@extends('public.father')

@section('css')

	<link href="/templates/hd/assets/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
	<link href="/templates/hd/assets/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

	<link href="/templates/hd/assets/css/personal.css" rel="stylesheet" type="text/css">
	<link href="/templates/hd/assets/css/addstyle.css" rel="stylesheet" type="text/css">


@endsection

@section('script')

	<script src="/templates/hd/assets/AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
	<script src="/templates/hd/assets/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
@endsection

@section('content')

		<div class="nav-table">
			<div class="long-title"><span class="all-goods">全部分类</span></div>
		</div>
		<b class="line"></b>

		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-address">




						<div class="clear"></div>
						<a class="new-abtn-type" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0}">编辑地址</a>
						<!--例子-->
						<div class="am-modal am-modal-no-btn" id="doc-modal-1">

							<div class="add-dress">

								<!--标题 -->
								<div class="am-cf am-padding">
									<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">编辑地址</strong> / <small>Edit&nbsp;address</small></div>
								</div>
								<hr/>

								<div class="am-u-md-12 am-u-lg-8" style="margin-top: 20px;">
									<form class="am-form am-form-horizontal" action="{{route('edit')}}" method="post">
										@csrf
										<input type="hidden" name="adress_id" value="{{$adress['id']}}">
										<div class="am-form-group">
											<label for="user-name" class="am-form-label">收货人</label>
											<div class="am-form-content">
												<input type="text" name="name" value="{{$adress['name']}}" id="user-name" placeholder="收货人">
											</div>
										</div>

										<div class="am-form-group">
											<label for="user-phone" class="am-form-label">手机号码</label>
											<div class="am-form-content">
												<input id="user-phone" name="tel" value="{{$adress['tel']}}" placeholder="手机号必填" type="tel">
											</div>
										</div>
										<div class="am-form-group">
											<label for="user-address" class="am-form-label">所在地</label>
											<div class="am-form-content address">
												<select data-am-selected name="sheng">
													<option value="浙江省">浙江省</option>
													<option value="湖北省">湖北省</option>
												</select>
												<select data-am-selected name="shi">
													<option value="温州市">温州市</option>
													<option value="武汉市">武汉市</option>
												</select>
												<select data-am-selected name="qu">
													<option value="瑞安区">瑞安区</option>
													<option value="洪山区">洪山区</option>
												</select>
											</div>
										</div>

										<div class="am-form-group">
											<label for="user-intro" class="am-form-label">详细地址</label>
											<div class="am-form-content">
												<textarea class="" rows="3" id="user-intro" placeholder="输入详细地址" name="moreadress">{{$adress['moreadress']}}</textarea>
												<small>100字以内写出你的详细地址...</small>
											</div>
										</div>

										<div class="am-form-group">
											<div class="am-u-sm-9 am-u-sm-push-3">
												<button type="submit" class="am-btn am-btn-danger">保存</button>

											</div>
										</div>
									</form>
								</div>

							</div>

						</div>

					</div>

					<script type="text/javascript">
						$(document).ready(function() {							
							$(".new-option-r").click(function() {
								$(this).parent('.user-addresslist').addClass("defaultAddr").siblings().removeClass("defaultAddr");
							});
							
							var $ww = $(window).width();
							if($ww>640) {
								$("#doc-modal-1").removeClass("am-modal am-modal-no-btn")
							}
							
						})
					</script>

					<div class="clear"></div>

				</div>
				<!--底部-->
			</div>

			@include('public.aside')
		</div>

@endsection